test(core): make the orgtrack suite portable to Windows - #697
Merged
Conversation
Three fixtures assumed unix filesystem semantics, leaving 8 tests and clippy -D warnings permanently red on Windows and burying real regressions in a known-failure baseline: - The copilot fixture created the literal macOS draft-dir shape `pending-session:draft:<uuid>`; NTFS reserves ':' for alternate data streams, so the shared builder failed all seven copilot tests. Unix keeps the provider-exact shape; Windows exercises the same not-a-plain-session-id rejection with a legal separator. - The kimi home-override test used unix-rooted absolute paths, which are not absolute on Windows and silently routed the inside-home case through the fallback branch. Fixtures now derive platform-absolute paths from temp_dir. - UNIX_EPOCH was imported at scan_snapshot_tests top level but only used inside a cfg(unix) test; the import moves inside the gate. cargo test -p orgtrack_core --lib: 537 passed / 0 failed on Windows. cargo clippy -p orgtrack_core --all-targets -- -D warnings: clean. Pre-commit hook ran. Total eslint: 18, total circular: 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Windows runs of
cargo test -p orgtrack_core --libcarried a permanent 8-failure baseline (7 copilot, 1 kimi) plus a clippy-D warningsfailure, so local verification and real-machine test protocols on Windows could not distinguish new regressions from environment noise.Solution
All three are test-portability fixes; no production code changes.
pending-session:draft:<uuid>— NTFS cannot create names containing:. Unix keeps the provider-exact literal; Windows exercises the same not-a-plain-session-id rejection through a legal separator.kimi_code_home_override_stays_inside_external_history_identityused unix-rooted absolute fixture paths, which are notis_absoluteon Windows and silently exercised the fallback branch instead of the inside-home acceptance branch. Fixtures now derive platform-absolute paths fromtemp_dir.UNIX_EPOCHwas imported at the top level but only used inside a#[cfg(unix)]test; the import moves inside the gate, unblocking-D warnings.Verification
cargo test -p orgtrack_core --lib— 537 passed, 0 failed, 8 ignored (first fully green Windows run).cargo clippy -p orgtrack_core --all-targets -- -D warnings— clean.:draft shape, the symlink walker test) remain gated exactly as before, so macOS/Linux coverage is unchanged.